package com.rush.springbootinit.job;

import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class EsExitJugment {
    private final ApplicationContext context ;

    public EsExitJugment(ApplicationContext context) {
        this.context = context;
    }

    public boolean isElasticsearchConnected() {
        return context.containsBean("elasticsearchRestTemplate");
    }
}
